This avoids more strdups at startup.
if (day_padding)
{
gtk_style_context_save (context);
- gtk_style_context_add_class (context, "day-number");
+ gtk_style_context_add_class (context, I_("day-number"));
gtk_style_context_get_padding (context, day_padding);
gtk_style_context_restore (context);
}
if (day_name_padding)
{
gtk_style_context_save (context);
- gtk_style_context_add_class (context, "day-name");
+ gtk_style_context_add_class (context, I_("day-name"));
gtk_style_context_get_padding (context, day_name_padding);
gtk_style_context_restore (context);
}
if (week_padding)
{
gtk_style_context_save (context);
- gtk_style_context_add_class (context, "week-number");
+ gtk_style_context_add_class (context, I_("week-number"));
gtk_style_context_get_padding (context, week_padding);
gtk_style_context_restore (context);
}
g_param_spec_int ("minimum-width",
P_("Minimum Width"),
P_("Minimum cached width"),
- -1,
- G_MAXINT,
- -1,
- G_PARAM_READABLE));
+ -1, G_MAXINT, -1,
+ GTK_PARAM_READABLE));
/**
* GtkCellAreaContext:natural-width:
g_param_spec_int ("natural-width",
P_("Minimum Width"),
P_("Minimum cached width"),
- -1,
- G_MAXINT,
- -1,
- G_PARAM_READABLE));
+ -1, G_MAXINT, -1,
+ GTK_PARAM_READABLE));
/**
* GtkCellAreaContext:minimum-height:
g_param_spec_int ("minimum-height",
P_("Minimum Height"),
P_("Minimum cached height"),
- -1,
- G_MAXINT,
- -1,
- G_PARAM_READABLE));
+ -1, G_MAXINT, -1,
+ GTK_PARAM_READABLE));
/**
* GtkCellAreaContext:natural-height:
g_param_spec_int ("natural-height",
P_("Minimum Height"),
P_("Minimum cached height"),
- -1,
- G_MAXINT,
- -1,
- G_PARAM_READABLE));
+ -1, G_MAXINT, -1,
+ GTK_PARAM_READABLE));
}
/*************************************************************
gtk_container_add (GTK_CONTAINER (box), button);
cc->priv->settings = g_settings_new ("org.gtk.Settings.ColorChooser");
- variant = g_settings_get_value (cc->priv->settings, "custom-colors");
+ variant = g_settings_get_value (cc->priv->settings, I_("custom-colors"));
g_variant_iter_init (&iter, variant);
i = 0;
p = NULL;
gtk_container_add (GTK_CONTAINER (cc), box);
gtk_container_add (GTK_CONTAINER (box), cc->priv->editor);
- g_settings_get (cc->priv->settings, "selected-color", "(bdddd)",
+ g_settings_get (cc->priv->settings, I_("selected-color"), "(bdddd)",
&selected,
&color.red, &color.green, &color.blue, &color.alpha);
if (selected)
#include "gtkgesturelongpress.h"
#include "gtkintl.h"
#include "gtksnapshot.h"
+#include "gtkprivate.h"
struct _GtkColorPlanePrivate
{
"Hue Adjustment",
"Hue Adjustment",
GTK_TYPE_ADJUSTMENT,
- G_PARAM_WRITABLE |
+ GTK_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class,
"Saturation Adjustment",
"Saturation Adjustment",
GTK_TYPE_ADJUSTMENT,
- G_PARAM_WRITABLE |
+ GTK_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
g_object_class_install_property (object_class,
"Value Adjustment",
"Value Adjustment",
GTK_TYPE_ADJUSTMENT,
- G_PARAM_WRITABLE |
+ GTK_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY));
}
#include "gtkicontheme.h"
#include "gtksettingsprivate.h"
#include "gtkstyleproviderprivate.h"
+#include "gtkintl.h"
/*
* The idea behind this value (and the '-gtk-icon-theme' CSS property) is
result = _gtk_css_value_new (GtkCssValue, >K_CSS_VALUE_ICON_THEME);
result->icontheme = g_object_ref (icontheme);
- g_object_set_data (G_OBJECT (icontheme), "-gtk-css-value", result);
+ g_object_set_data (G_OBJECT (icontheme), I_("-gtk-css-value"), result);
result->changed_id = g_signal_connect (icontheme, "changed", G_CALLBACK (gtk_css_value_icon_theme_changed_cb), result);
return result;
name = _gtk_css_parser_try_ident (parser, FALSE);
if (name)
{
- selector = gtk_css_selector_new (>K_CSS_SELECTOR_NAME,
- selector);
+ selector = gtk_css_selector_new (>K_CSS_SELECTOR_NAME, selector);
selector->name.name = g_intern_string (name);
g_free (name);
parsed_something = TRUE;
#include "gtkcssstylepropertyprivate.h"
#include "gtkcsstransitionprivate.h"
#include "gtkprivate.h"
+#include "gtkintl.h"
#include "gtksettings.h"
#include "gtkstyleanimationprivate.h"
#include "gtkstylepropertyprivate.h"
default_style = gtk_css_static_style_new_compute (GTK_STYLE_PROVIDER (settings),
NULL,
NULL);
- g_object_set_data_full (G_OBJECT (settings), "gtk-default-style",
+ g_object_set_data_full (G_OBJECT (settings), I_("gtk-default-style"),
default_style, clear_default_style);
}
P_("Search mode"),
P_("Search mode"),
FALSE,
- G_PARAM_READWRITE));
+ GTK_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_SUBTITLE,
g_param_spec_string ("subtitle",
P_("Subtitle"),
P_("Subtitle"),
"",
- G_PARAM_READABLE));
+ GTK_PARAM_READABLE));
_gtk_file_chooser_install_properties (gobject_class);
P_("The selection mode"),
GTK_TYPE_SELECTION_MODE,
GTK_SELECTION_SINGLE,
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFlowBox:activate-on-single-click:
P_("Activate on Single Click"),
P_("Activate row on a single click"),
TRUE,
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFlowBox:homogeneous:
P_("Homogeneous"),
P_("Whether the children should all be the same size"),
FALSE,
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFlowBox:min-children-per-line:
P_("The minimum number of children to allocate "
"consecutively in the given orientation."),
0, G_MAXUINT, 0,
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFlowBox:max-children-per-line:
P_("The maximum amount of children to request space for "
"consecutively in the given orientation."),
1, G_MAXUINT, DEFAULT_MAX_CHILDREN_PER_LINE,
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFlowBox:row-spacing:
P_("Vertical spacing"),
P_("The amount of vertical space between two children"),
0, G_MAXUINT, 0,
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkFlowBox:column-spacing:
P_("Horizontal spacing"),
P_("The amount of horizontal space between two children"),
0, G_MAXUINT, 0,
- G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
+ GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, LAST_PROP, props);
update_state (button);
context = gtk_widget_get_style_context (GTK_WIDGET (button));
- gtk_style_context_add_class (context, "lock");
+ gtk_style_context_add_class (context, I_("lock"));
}
static void
#include "gtkmenutrackeritem.h"
#include "gtkactionmuxer.h"
#include "gtkdebug.h"
+#include "gtkintl.h"
#include "gtkactionmuxer.h"
};
GType type;
- type = g_enum_register_static ("GtkMenuTrackerItemRole", values);
+ type = g_enum_register_static (I_("GtkMenuTrackerItemRole"), values);
g_once_init_leave (>k_menu_tracker_item_role_type, type);
}
#include "gtkgesturelongpress.h"
#include "gtkbox.h"
#include "gtkmodelbutton.h"
+#include "gtkprivate.h"
/**
* SECTION:gtkplacessidebar
P_("Location to Select"),
P_("The location to highlight in the sidebar"),
G_TYPE_FILE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_OPEN_FLAGS] =
g_param_spec_flags ("open-flags",
P_("Open Flags"),
P_("Modes in which the calling application can open locations selected in the sidebar"),
GTK_TYPE_PLACES_OPEN_FLAGS,
GTK_PLACES_OPEN_NORMAL,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_SHOW_RECENT] =
g_param_spec_boolean ("show-recent",
P_("Show recent files"),
P_("Whether the sidebar includes a builtin shortcut for recent files"),
TRUE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_SHOW_DESKTOP] =
g_param_spec_boolean ("show-desktop",
P_("Show “Desktop”"),
P_("Whether the sidebar includes a builtin shortcut to the Desktop folder"),
TRUE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_SHOW_ENTER_LOCATION] =
g_param_spec_boolean ("show-enter-location",
P_("Show “Enter Location”"),
P_("Whether the sidebar includes a builtin shortcut to manually enter a location"),
FALSE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_LOCAL_ONLY] =
g_param_spec_boolean ("local-only",
P_("Local Only"),
P_("Whether the sidebar only includes local files"),
FALSE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_SHOW_TRASH] =
g_param_spec_boolean ("show-trash",
P_("Show “Trash”"),
P_("Whether the sidebar includes a builtin shortcut to the Trash location"),
TRUE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_SHOW_OTHER_LOCATIONS] =
g_param_spec_boolean ("show-other-locations",
P_("Show “Other locations”"),
P_("Whether the sidebar includes an item to show external locations"),
FALSE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_SHOW_STARRED_LOCATION] =
g_param_spec_boolean ("show-starred-location",
P_("Show “Starred Location”"),
P_("Whether the sidebar includes an item to show starred files"),
FALSE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
/**
* Since: 3.18
*/
properties[PROP_POPULATE_ALL] =
- g_param_spec_boolean ("populate-all",
+ g_param_spec_boolean (I_("populate-all"),
P_("Populate all"),
P_("Whether to emit ::populate-popup for popups that are not menus"),
FALSE,
#include <gio/gvfs.h>
#include <gtk/gtk.h>
+#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
#include "gtkplacesviewprivate.h"
P_("Local Only"),
P_("Whether the sidebar only includes local files"),
FALSE,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
properties[PROP_LOADING] =
g_param_spec_boolean ("loading",
P_("Loading"),
P_("Whether the view is loading locations"),
FALSE,
- G_PARAM_READABLE);
+ GTK_PARAM_READABLE);
properties[PROP_FETCHING_NETWORKS] =
g_param_spec_boolean ("fetching-networks",
P_("Fetching networks"),
P_("Whether the view is fetching networks"),
FALSE,
- G_PARAM_READABLE);
+ GTK_PARAM_READABLE);
properties[PROP_OPEN_FLAGS] =
g_param_spec_flags ("open-flags",
P_("Modes in which the calling application can open locations selected in the sidebar"),
GTK_TYPE_PLACES_OPEN_FLAGS,
GTK_PLACES_OPEN_NORMAL,
- G_PARAM_READWRITE);
+ GTK_PARAM_READWRITE);
g_object_class_install_properties (object_class, LAST_PROP, properties);
P_("Filename"),
P_("The full path to the file to be used to store and read the list"),
NULL,
- (G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)));
+ (G_PARAM_CONSTRUCT_ONLY | GTK_PARAM_READWRITE)));
/**
* GtkRecentManager:size:
g_param_spec_int ("size",
P_("Size"),
P_("The size of the recently used resources list"),
- -1,
- G_MAXINT,
- 0,
- G_PARAM_READABLE));
+ -1, G_MAXINT, 0,
+ GTK_PARAM_READABLE));
/**
* GtkRecentManager::changed:
P_("Child Revealed"),
P_("Whether the child is revealed and the animation target reached"),
FALSE,
- G_PARAM_READABLE);
+ GTK_PARAM_READABLE);
g_object_class_install_properties (object_class, LAST_PROP, props);
if (GTK_IS_ACCESSIBLE (atk_obj))
atk_object_set_name (atk_obj, _("Search"));
- gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), "search");
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (entry)), I_("search"));
}
/**
g_signal_connect (widget, "child-notify::position",
G_CALLBACK (on_position_updated), sidebar);
- g_object_set_data (G_OBJECT (item), "stack-child", widget);
+ g_object_set_data (G_OBJECT (item), I_("stack-child"), widget);
g_hash_table_insert (priv->rows, widget, row);
gtk_container_add (GTK_CONTAINER (priv->list), row);
}
if (!klass.type)
klass.type = gtk_text_attr_appearance_type =
- pango_attr_type_register ("GtkTextAttrAppearance");
+ pango_attr_type_register (I_("GtkTextAttrAppearance"));
result = g_slice_new (GtkTextAttrAppearance);
result->attr.klass = &klass;
#include "gtkadjustment.h"
#include "gtkintl.h"
#include "gtktooltip.h"
+#include "gtkprivate.h"
/**
P_("Use symbolic icons"),
P_("Whether to use symbolic icons"),
TRUE,
- G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY));
+ GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY));
/* Bind class to template
*/
_gtk_widget_set_captured_event_handler (GtkWidget *widget,
GtkCapturedEventHandler callback)
{
- g_object_set_data (G_OBJECT (widget), "captured-event-handler", callback);
+ g_object_set_data (G_OBJECT (widget), I_("captured-event-handler"), callback);
}
static gboolean
return_val = _gtk_widget_run_controllers (widget, event_copy, GTK_PHASE_CAPTURE);
- handler = g_object_get_data (G_OBJECT (widget), "captured-event-handler");
+ handler = g_object_get_data (G_OBJECT (widget), I_("captured-event-handler"));
if (!handler)
goto out;
GtkEventController *controller;
controller = _gtk_event_controller_legacy_new (widget);
- g_object_set_data_full (G_OBJECT (widget),
- "gtk-widget-legacy-event-controller",
+ g_object_set_data_full (G_OBJECT (widget), I_("gtk-widget-legacy-event-controller"),
controller, g_object_unref);
}